package com.buss.product.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.buss.core.persistence.ResultList;
import com.buss.product.dao.GoodsDetailDao;
import com.buss.product.model.GoodsDetail;
import com.buss.product.service.GoodsDetailService;

@Service
public class GoodsDetailServiceImpl implements GoodsDetailService {

	@Autowired
	private GoodsDetailDao detailDao;
	
	@Override
	public ResultList<GoodsDetail> queryGoodsDetail(Long goodsId) {
		return detailDao.queryGoodsDetail(goodsId);
	}

	@Override
	public void removeGoodsDetailByGoodsId(Long id) {
		detailDao.removeGoodsDetailByGoodsId(id);
	}

	@Override
	public void removeGoodsDetailByNotIds(Long goodsId,Long[] ids) {
		detailDao.removeGoodsDetailByNotIds(goodsId,ids);
	}
	
	public ResultList<GoodsDetail> queryGoodsDetailByBarcode(String companyId,String branchId,String barCode){
		return detailDao.queryGoodsDetailByBarcode(companyId, branchId, barCode);
	}

}
